cmake_minimum_required(VERSION 2.8 FATAL_ERROR)

include_directories(${CMAKE_CURRENT_SOURCE_DIR})

find_package(LibHdf4utils REQUIRED)
include_directories(${LibHdf4utils_INCLUDE_DIRS})
set(LIBS ${LibHdf4utils_LIBRARIES})

find_package(LibNetcdfutils REQUIRED)
include_directories(${LibNetcdfutils_INCLUDE_DIRS})
list(APPEND LIBS ${LibNetcdfutils_LIBRARIES})

find_package(LibHdf5utils REQUIRED)
include_directories(${LibHdf5utils_INCLUDE_DIRS})
list(APPEND LIBS ${LibHdf5utils_LIBRARIES})

add_library (dfutils
  wrapper.c
  scale_sds.c
)

target_link_libraries(dfutils ${LIBS})

install (TARGETS dfutils DESTINATION lib)
